import { BaseService, Service, Permission } from '@/cool';

@Service('crm/mdGoods')
export default class extends BaseService {
	// updateInfo  百万补贴更新商品数据
	@Permission('updateInfo')
	updateInfo(params) {
		return this.request({
			url: '/updateInfo',
			method: 'post',
			data: {
				...params
			}
		});
	}
	@Permission('cancelByBatchId')
	cancelByBatchId(params) {
		return this.request({
			url: '/cancelByBatchId',
			method: 'post',
			data: {
				...params
			}
		});
	}
	@Permission('addDayAllowanceGoodsRecord')
	addDayAllowanceGoodsRecord(params) {
		return this.request({
			url: '/addDayAllowanceGoodsRecord',
			method: 'post',
			data: {
				...params
			}
		});
	}
	@Permission('addFlashGoodsRecord')
	addFlashGoodsRecord(params) {
		return this.request({
			url: '/addFlashGoodsRecord',
			method: 'post',
			data: {
				...params
			}
		});
	}
	@Permission('independentSort')
	independentSort(params) {
		return this.request({
			url: '/independentSort',
			params
		});
	}

	// 同步平台配置
	@Permission('syncGoodsSort')
	syncGoodsSort(params) {
		return this.request({
			url: '/syncGoodsSort',
			method: 'post',
			data: {
				...params
			}
		});
	}
	// 单品营销金额
	@Permission('singleProductConfig')
	singleProductConfig(params) {
		return this.request({
			url: '/singleProductConfig',
			params
		});
	}
	// 单品营销金额设置
	@Permission('updateSingleProductConfig')
	updateSingleProductConfig(params) {
		return this.request({
			url: '/updateSingleProductConfig',
			method: 'post',
			data: {
				...params
			}
		});
	}
}
